Method and apparatus for de-duplication after mirror operation

ABSTRACT

De-duplication operations are applied to mirror volumes. Data stored to a first volume is mirrored to a second volume. The second volume is a virtual volume having a plurality of logical addresses, such that segments of physical storage capacity are allocated for a specified logical address as needed when data is stored to the specified logical address. A de-duplication operation is carried out on the second volume following a split from the first volume. A particular segment of the second volume is identified as having data that is the same as another segment in the second volume or in the same consistency group. A link is created from the particular segment to the other segment and the particular segment is released from the second volume so that physical storage capacity required for the second volume is reduced.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to mirroring technology instorage systems.

2. Description of Related Art

Volume mirroring is the replication of a first (primary) logical volumeto a separate mirror (secondary) logical volume. As updates are made tothe primary volume, the updates are also made (mirrored) to the mirrorvolume. Thus, the mirror volume is a complete and separate copy of theprimary volume. Volume mirroring technology may be used to enablerecovery of data upon the occurrence of data loss in the primary volume.Depending on the technologies used and the desired level of dataprotection, mirroring can be performed synchronously, asynchronously,semi-synchronously, or point-in-time, and the mirror volume may be alocal volume in the same storage system as the primary volume, or may bea remote volume located in a separate or remote storage system.

Current volume mirroring technology requires that the mirror volume havea size equal to or greater than the size of the primary volume beingmirrored, regardless of the actual data content on the primary volume.However, in many cases a primary volume may contain a large amount ofduplicated or redundant data, such as backups of files, differentversions of files, and the like, that are related to original files alsostored on the primary volume. Accordingly, it would be advantageous toreduce the amount of redundant or secondary data created or copied bymirroring technology, and thereby reduce the size of the mirror volumesand the overall storage capacity required to accommodate mirroringoperations.

U.S. Pat. No. 7,065,619, to Zhu et al., filed Dec. 20, 2002, thedisclosure of which is incorporated herein by reference, is directed toa data storage system that determines whether a data segment has beenstored previously using a summary stored in a low latency memory.However, the prior art is not able to be applied to de-duplication ofdata in a mirror volume that forms part of mirrored pair with a primaryvolume which has exactly the same volume size on physical disk.

BRIEF SUMMARY OF THE INVENTION

The invention includes methods and apparatuses to enable the applicationof de-duplication technology to mirror volumes. The de-duplicationtechnology reduces the duplicated data on a set of a consistency group,and accesses de-duplicated data using identifiers instead of the data.These and other features and advantages of the present invention willbecome apparent to those of ordinary skill in the art in view of thefollowing detailed description of the preferred embodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, in conjunction with the general descriptiongiven above, and the detailed description of the preferred embodimentsgiven below, serve to illustrate and explain the principles of thepreferred embodiments of the best mode of the invention presentlycontemplated.

FIG. 1 illustrates a process for a resynchronizing, split andde-duplication operation according to the invention.

FIG. 2 illustrates a reverse resynchronize and split operation accordingto the invention.

FIG. 3 illustrates an exemplary hardware architecture in which theinvention may be practiced.

FIG. 4 illustrates an exemplary logical configuration of thearchitecture of FIG. 3.

FIG. 5 illustrates a volume configuration management table.

FIG. 6 illustrates a volume-port mapping table for mapping betweenports, logical units and volume numbers.

FIG. 7 illustrates a virtual volume table that includes address spacesfor each virtual volume.

FIG. 8 illustrates a free segment pool.

FIGS. 9A-9B illustrate a mirror manager pair table to store mirrorinformation.

FIG. 10 illustrates a process for resynchronizing and reverseresynchronizing the primary and secondary volumes.

FIG. 11 illustrates a bitmap table.

FIG. 12 illustrates a process of a write operation during the resyncoperation.

FIG. 13 illustrates details of the de-duplication process.

FIG. 14 illustrates the process in a secondary volume for a readoperation after split.

FIG. 15 illustrates the process in a secondary volume for a writeoperation after split

FIG. 16 illustrates the physical configuration of another embodiment ofthe invention.

FIG. 17 illustrates the logical configuration of the embodiment of FIG.16.

FIGS. 18A-18D illustrate the physical and logical configurations ofadditional embodiments of the invention.

FIG. 19 illustrates an external volume mapping table.

FIG. 20 illustrates a physical and logical configuration of a seventhembodiment of the invention.

FIG. 21 illustrates a file system virtual volume table.

FIG. 22 illustrates an export table.

FIG. 23 illustrates a mirror manager pair table to store mirrorinformation.

FIG. 24 illustrates a bitmap table for use with file systems.

FIG. 25 illustrates an operation for resynchronization according to theembodiment of FIG. 20.

FIG. 26 illustrates a file status list.

FIG. 27 illustrates a process of a write operation during the resyncoperation.

FIG. 28 illustrates details of the de-duplication process in a NAS.

FIG. 29 illustrates the process in a secondary file system for a readoperation after split.

FIG. 30 illustrates a physical and logical configuration of an eighthembodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description of the invention, reference ismade to the accompanying drawings which form a part of the disclosure,and, in which are shown by way of illustration, and not of limitation,specific embodiments by which the invention may be practiced. In thedrawings, like numerals describe substantially similar componentsthroughout the several views. Further, the drawings, the foregoingdiscussion, and following description are exemplary and explanatoryonly, and are not intended to limit the scope of the invention or thisapplication in any manner.

Embodiments of the invention relate to mirroring technology and reducingthe amount of redundant data stored using mirroring technology.Embodiments of the invention use a de-duplicating operation forsecondary data after split of mirror. Embodiments of the inventioninclude a mirror manager that will be discussed further below, and thatis operational for carrying out the mirroring and de-duplicationoperations of the invention. FIG. 1 illustrates an exemplary process ofthe invention carried out by the mirror manager during a resynchronize,split and de-duplication operation under the invention. The processincludes Steps 1-6, which are described below.

Step 1: The mirror manager prohibits to access to the secondary volumes.Prior to step 1, in some implementations, host computers are able toaccess secondary volumes as data volumes. Thus, step 1 changes theaccessibility of the secondary volume and sets the access status of thesecondary volume to either read-only status or an all-access-deniedstatus.

Step 2: Mirror manager conducts a resynchronization of data from theprimary volume to the secondary volume to ensure that the secondaryvolume is fully synchronized with the primary volume, i.e., that thedata in the secondary volume matches the data contained in the primaryvolume.

Step 3: Mirror manager suspends the pair configuration followingcompletion of the resynchronizing operation. This is also referred to asa “split” operation, i.e., updates that are made to the data in theprimary volume are no longer copied to the secondary volume.

Step 4: Mirror manager checks whether the secondary volume has beendesignated for de-duplication operations. If the primary and secondaryvolumes are part of a consistency group, then this determination is madeby checking whether the consistency group has been flagged forde-duplication. If the flag has been set that indicates that the volumehas been designated for de-duplication, the procedure goes to Step 5. Onthe other hand, if the flag has not been set for de-duplication, thenthe procedure skips to Step 6.

Step 5: Mirror manager de-duplicates data on volumes under theconsistency group. The particulars of the de-duplication operations andthe architectures and data structures required for carrying theoperations out are set forth in greater detail in the exemplaryembodiments below.

Step 6: Mirror manager may change the access setting for the secondaryvolume back to enabled access for accepting all 10 operations.Alternatively, of course, the access setting may remain read-only if thesecondary volume is intended only for archiving. Step 1 and Step 6 maybe skipped if the mirror manager copies data online from the primaryvolume (P-VOL). For example, using what is referred to as “QuickSplit”capability, a user can refer to the secondary volume (S-VOL) after asplit operation. Thus, under QuickSplit capability, the user can seeS-VOL after a split even if there is no synchronization between P-VOLand S-VOL. Internally, in the case of QuickSplit capability, on a writeoperation for S-VOL, the mirror manager modifies the data for the writeand stores the data on S-VOL. Additionally, for a read operation forS-VOL where the requested data has not been synchronized from P-VOL, themirror manager reads the data from P-VOL, returns the requested data tothe host, and then also stores the read data on S-VOL. This is analternative online solution that may be used instead of offline steps1-6 discussed above. Further, the process set forth above may beotherwise modified for various implementations of the invention, severalexamples of which are described below in the detailed embodiments.

Additionally, when a user wants to restore data contained on ade-duplicated secondary volume, such as when data in a primary volume islost or corrupted, a process of the invention set forth in FIG. 2including steps 11-15 may be carried out, as described below.

Step 11: Mirror manager changes the access settings for an identifiedsecondary volume from which data is desired to be restored so as toprohibit external access to the identified secondary volume.

Step 12: Mirror manager checks the de-duplication flag of the identifiedsecondary volume to determine whether the secondary volume was . thesubject of the de-duplication process of the invention. If the flagshows that de-duplication was performed, the procedure goes to Step 13.On the other hand, if the flag shows that de-duplication was notperformed, the procedure skips to Step 14.

Step 13: Mirror manager resynchronizes data from a virtual secondaryvolume (V-VOL) which has been previously de-duplicated to thecorresponding primary volume (details of the procedure are discussedbelow).

Step 14: Mirror manager resynchronizes data from a normal secondaryvolume to the corresponding primary volume.

Step 15: Mirror manager again allows access to the secondary volume foraccepting all I/O operations, and the procedure ends.

The description of the invention includes eight exemplary embodiments asexamples of the invention that implement the above-described operations.Thus, the described embodiments de-duplicate secondary data following aresynchronize and split operation under a mirroring configuration, andreduce the size of the secondary volumes, thereby saving overall storagespace devoted to mirroring operations.

Embodiment 1: Local Mirror using Storage Area Network

FIG. 3 illustrates exemplary hardware architecture and interconnectionsamong the various components of an information system in which the firstembodiment of the invention may be implemented. The architecture of theinformation system of this embodiment includes at least one hostcomputer 20 and at least one storage system 30 able to communicate via astorage area network (SAN) 81 created by networking hardware 80.

Host computer 20 may include a hardware configuration such as that for aconventional workstation or personal computer. Thus, host computer 20may include a CPU 21, a memory 22, and an internal hard disk drive 23.Host computer 20 may also include a host bus adapter (HBA) 24 to enableconnection to Fibre Channel (FC) components, Ethernet components, orother type of networking components that form part of networkinghardware 80. Each host computer 20 stores data on one or more logicalunits (LUs) (i.e., logical volumes) provided by storage system 30.

Storage system 30 includes one or more controllers 31 for controllingdata access to and from a plurality of storage devices 32. Storagedevices 32 are preferably hard disk drives, but in some embodiments maybe other types of mass storage devices that provide physical storagespace for storage of large amounts of data. Controller 31 includes a CPU18, a memory 17, and a network interface card (NIC) 36 for connection toa management computer 37. Controller 31 may also include at least onefront end port 16, such as a Fibre Channel port, for communicating withhost computer 20 via SAN 81, and may also include at least one back endport 19 for connection to disks 32, such as via a Fibre Channelconnection, SCSI (Small Computer System Interface) or the like.Controller 31 preferably includes a non-volatile random access memory(NVRAM) as at least a portion of memory 17, and can store data to theNVRAM for data caching purposes so that the data is protected, such asfrom a power failure. Port 16 and/or port 19 may have WWNs (World WideNames) for specifying a target ID under SCSI protocol from a host, suchas by specifying a LUN on a FC port. In some embodiments, controller 31may be a RAID controller for configuring and operating on disks 32 in aRAID configuration, and may use SCSI-2, SCSI-3 or other protocolcommands to store data on disks 32.

The storage system 30 may include a management computer 37 which isconnected to the storage system for carrying out management functions.The management computer 37 may be a general web-based PC or workstationlocally connected directly to storage system 30 via an Ethernetconnection, or the like. Alternatively, management computer 37 may belocated remotely from storage system 30 and an able to access storagesystem 30 via a generic IP protocol such as through a LAN or WAN.

Logical Configuration

FIG. 4 illustrates a logical configuration of the embodiment of FIG. 3,including illustration of software components and interconnections. SAN81 provides a block access capable logical network connection, suchSCSI, FC-SCSI, ESCON or other type of access protocol. In the embodimentdescribed, FC-SCSI will be used to explain the embodiment. SAN 81provides a logical connection between host computer 20 and storagesystem 30 via one or more logical ports 38 which may be created by ahost storage domain that is based on host groups created using hostWWNs. A number of logical ports 38 may be provided via one or morephysical ports 16. SAN 81 may be provided by one or more of FibreChannel switches, FC network hubs, Ethernet Switches, Ethernet hubs, orother types of networking devices (not shown), as is known iri the art.

Host computer 20 may include an operating system (OS) 26, one or moreapplications (App) 28, and a SCSI driver 27 or other appropriate type ofdriver to enable host computer 20 to access one or more LUs on storagesystem 30. OS 26 may be UNIX, Microsoft Windows, Solaris, Z/OS, AIX, orother OS. Application 28 may be a transaction type application such as adatabase, an office application, or other kind of application thatstores data to and retrieves data from one or more LUs on storage system30. To assist in coordinating and controlling the mirroring operations,host computer 20 may have a storage control agent 29 as an in-bandcontrol mechanism able to communicate with storage system 30.

A technology which controls the storage devices using SCSI command setsmay be used for the communication method with storage system 30. Suchtechnology is described in US Patent Application Publication No.2002/0143903, to Uratani et al., filed Feb. 26, 2002, the disclosure ofwhich is incorporated herein by reference in its entirety. Accordingly,storage system 30 may implement one or more command devices, and agent29 may be equal to the operation API (RMLIB) in US2002/0143903, and theone or more command devices may be functionally equal to command devices(CMs) in US Pat. Appl. Pub. No. 2002/0143903. Agent 29 is able toprovide an application program interface (API) or a command lineinterface (CLI) for use in providing instructions for couplingoperations to LUs in the storage system 30.

Storage system 30 includes one or more modules for carrying out theinvention. The modules of storage system 30 may be enabled in microcodewhich is executed on the controller (CTL) 31 and may be provided as aprogram code installed from optical media, floppy disk, or othercomputer readable medium. In the illustrated embodiment, the modulesinclude a parity group manager 39 for creating and managing paritygroups, a volume manager 33 for creating and managing one or morevolumes for providing the volumes to the host computer 20, a virtualvolume manager 35, a mirror manager 34, a volume configurationmanagement table 100 and a volume-port mapping table 110. Each of thesemodules or tables is described further below.

Parity group manager module 39 may be a portion of the microcode forcontrolling controller 31, and controls the creation and management ofone or more parity groups, when appropriate, from disks 32 using RAIDtechnology. For example, RAID 1 provides for a mirror disk, RAID 3 andRAID 4 provide for a dedicated parity disk, a RAID 5 parity grouptypically includes distributed storage of parity data, while RAID 6,based on RAID 5 technology, provides dual parity protection. Paritygroup manager module creates a RAID parity group, and the parity groupis listed in a volume-parity group mapping table 100, as illustrated inFIG. 5. As will be discussed below, one or more volumes may be createdon each parity group.

Volume configuration management table 100 includes a parity group number101 for identifying the parity group within storage system 30, a usablecapacity size 102 created from disks 32 according to a specified RAIDtechnology, the RAID configuration 103, and the identifiers 104 of thedisks 32 that make up the parity group.

Volume manager 33 manages the structure of each logical volume (LU) andthe behavior of the volume for I/O operations. The volume is createdfrom at least a portion of a parity group and represents logical blockaddresses (LBAs) that correspond to physical storage areas on the disks32 that make up the parity group. Thus, a host computer 20 is able tosave data to a LBA in a volume, and the data is stored to acorresponding physical area in one or more of disks 32 that make up theparity group. A storage administrator may define and initially formatthe volume, and may designate a volume number for the volume. Themapping between volume and parity group is stored in volume-parity groupmapping table 100, as illustrated in FIG. 5. Thus, volume-parity groupmapping table 100 includes a volume number 105 to identify the logicalvolume within a parity group 101 within the storage system 30, a startLogical Block Address (LBA) 106 to represent a particular volume's startaddress on the parity group, an end LBA 107 to represent the last LBA inthe particular volume, and a size 108 of the particular VOL. Asdiscussed above, the start LBA 106 and end LBA 107 may be correspondedto physical addresses of physical storage areas in the parity group.

The logical volume is presented to the host computer 20 by storagesystem 30 as an area for storage of data. Host 20 may store data to avolume by designating a WWN, a logical unit number (LUN) and a start LBAin a write command through SAN 81. Thus, each volume may be assigned aLUN by which a host may identify that volume. FIG. 6 illustrates amapping table 110 showing the mapping between ports, LUNs and volumes.Each value in the port number column 111 corresponds to one of the ports16. Each port 16 has its own WWN 112 to be specified from the hostcomputer 12. A plurality of volumes and corresponding LUNs can beassigned on each port 16. Thus, a volume is able to be specified by thehost computer using a set of the WWN 112 and the LUN 113. The maximumnumber of LUs that may be assigned to a port based on Fibre Channelprotocol (FCP) specifications is indicated by 8 bytes. Further, based onthe mapping information of LUN 113 to volume 114 in volume-port mappingtable 110, the controller 31 receives SCSI commands from the port andconverts the set of WWN 112 and LUN 113 into the volume 114 whenreceiving an access command, so that the appropriate volume to access isdetermined.

Also a command device entry 115 may be included to indicate if a commanddevice controls entry by the host computer 20 to the storage system 30in a manner similar to that disclosed in the above-discussedUS2002/0143903. A function of the command device is to control copycapability from an agent 29 on a host 20. In FIG. 6, an “X” in thecommand device column 115 indicates that LUN 2 (VOL2) is configured toact as a command device. The command device may be a separate LU, butdoes not need to be. For example, each LU (volume) may include thecapabilities of a command device for controlling storage system 30. Forconvenience, a command device may be used within a consistency group ofthe invention; however, a command device may also be created without aconsistency group. Further, each LUN on a port has a state of accessmode 116. This access mode defines how a host computer is able access onvolume data. The mode for volumes consists of following modes: “RAN”which provides read/write access; “R/O” which provides read only access;and “DENY” which denies any access. Thus, for example, if a writeoperation is received for a volume whose mode is “R/O”, the port moduleof the storage system microcode returns an error to the host computerthat sent the write command. Similarly, if “DENY” is the mode status,the port returns an error for all operations attempted by a hostcomputer for that volume.

Mirror Manager 34 controls mirror operations for the storage system 30.Typical mirror operations include “create pair”, “resync”, “reverseresync”, and “delete pair”. Each of these operations will be discussedfurther below.

Virtual volume manager 35 manages “allocation-on-use volumes” that maybe present in the storage system 30. In allocation-on-use technology, avolume does not have physical storage area (segment) from the paritygroup assigned to the volume until a write operation occurs thatrequires that a physical storage area be assigned to a particularportion of the volume. For such volume, if a read operation is receivedthat is directed to a LBA of the allocation-on-use volume that does notyet have a physical storage segment assigned, then virtual volumemanager 35 returns a series of zeros, or other system-defined oruser-defined null value. On the other hand, when a physical storagesegment has already been assigned to the LBA, the virtual volume manager35 returns the data stored in the allocated segment. One example ofallocation-on-use technology is described in U.S. Pat. No. 6,836,819,entitled “Automated On-Line Capacity Expansion Method for StorageDevice”, to Kano et al., filed Feb. 23, 2004, the disclosure of which isincorporated by reference herein in its entirety.

As example of an allocation-on-use-operation, FIG. 7 illustrates avirtual volume table 120 of address spaces for each virtual volume. Thetable consists of a virtual volume (VVOL) number 121 to identify thevirtual volume within the storage system, a size of the virtual volume122 which a host can retrieve using a SCSI READ Capacity command, astart virtual logical block address (VLBA) 123 to represent a startaddress space divided by each segment on virtual volume, a size 124 foreach segment, and a segment number 125 for each segment. As additionalinformation for allocation-on-use technology, the virtual volume table120 includes a hash information 126 to indicate the uniqueness of datain a particular segment, and a link status 127 to indicate if thesegment is linked, i.e., (YES) or not (−). Mirror manager 34 uses thisinformation in a de-duplication operation carried out under theinvention during a split operation, as will be discussed further below.Regarding VVOL number 121, volume-port mapping table 110 of FIG. 6 usesa “VVOL” number prefix, such as adding “100” or “1000” to the primaryvolume number, to identify a virtual volume on 114 in volume-portmapping table 110 in order to map the virtual volume to a port.

Regarding the segments that are allocated to the virtual volume, thereis a pool of free segments from which segments are allocated. FIG. 8illustrates a free segment pool 130. Storage administrator or virtualvolume manager 35 allocates one or more volumes which are specified byvolume number to free segment pool 130. Virtual volume manager 35divides the volumes by a segment size which the system or administratorhas predefined, and puts the segments into the segment pool. The freesegment pool 130 consists of a segment number 131 to identify thesegment using a unique identifier within the storage system 30, volumenumber 132, and start LBA 133 for the segment and size of segment 134.

Operations—Overview

Initially the storage system is set up to have one or more primaryvolumes allocated for use by a host computer. After preparing theprimary volumes, a mirror pair is created for each primary volume. Atsome point, the mirror volume is subjected to a resync and split withde-duplication operation. Moreover, the split volume may be restored toact as a primary volume or other volume. Each of these processes isdescribed in additional detail below.

Initial Setup

The administrator creates or initiates the creation of one or moreprimary volumes 49 and the command device volume (in this example,“VOL2” has been designated to act as the command device, as discussedabove) from one or more parity groups in storage system 30. Theadministrator or a mirroring program then chooses and creates asecondary volume 50 for forming a mirror pair with each of the primaryvolumes 49. Secondary volumes 50 may be allocation-on-use virtualvolumes, as discussed above. The administrator creates a path from theprimary volume 49 to host computer 20 using volume-port mapping table110. Multiple mirror pairs may be grouped together into a consistencygroup, as illustrated in FIG. 4. In a consistency group the multiplereplication pairs are grouped together to ensure write order consistencyfrom host I/O across all the primary volumes in the group. Anadministrator sets up the agent 29 on host computer 20 to communicatewith the command device. In this invention, primary volume(s) 49 and thecommand device volume are logical volumes for which physical storagecapacity is allocated at the time the volume is created. However,allocation-on-use virtual volumes may also be used for primary volume(s)49 and a separate command device volume in some implementations of theinvention.

Pair Creation

Using a command line interface or other means, an administrator is ableto create a consistency group and replication (mirroring) pairs betweenprimary volumes 49 and secondary volumes 50. At this time, theadministrator turns a “de-duplication option” on for the consistencygroup. In this operation, we use a mirror manager pair table 140 asillustrated in FIG. 9 to store mirror information. The mirror managerpair table, 140 consists of a pair number 141 to identify a mirror pair,a consistency group number (C.G. No.) 142 to indicate a consistencygroup in which mirror manager 34 serializes I/Os among volumes andde-duplicates data within the group.

Mirror manager pair table 140 also includes primary and secondary volumeinformation and status of de-duplication 136 to indicate the status ofde-duplication 136 for each pair to indicate a current state of thesecondary volume regarding de-duplication. The status of de-duplicationmay be in one of three states: “processed” (i.e., de-duplication iscompleted), “processing” (i.e., de-duplication is currently beingcarried out), or “un-processed” (i.e., still awaiting de-duplicationprocessing). A de-duplication flag 137 is included for each consistencygroup to indicate whether the mirror manager is to executede-duplication (Yes) or not (No) for the secondary volumes in thatconsistency group.

The primary and secondary volume information consists of serial number143, 147 for the storage system on which each volume resides; port 144,148 and LUN 145, 149 by which each volume is accessed, and volume number(VOL) 146, 135 for each volume. In the embodiment illustrated in FIG. 4,the same storage system 30 is used for both the primary volumes 49 andsecondary volumes 50. Thus, for this embodiment, the serial number ofthe storage system for the primary volumes in column 143 is as same asthe serial number for the secondary volumes in column 147, asillustrated in FIG. 9A. However, in other embodiments described below,the secondary volumes are located in a separate storage system, andinclude different serial number in column 147, as illustrated in FIG.9B.

Resync and Reverse Resync Operation

A resync operation synchronizes (mirrors) updates made to primaryvolumes to secondary volumes under a specified consistency group. Thus,whenever an update is made to primary volume 49, the correspondingsecondary volume 50 that forms a mirror pair with the updated primaryvolume must be resynchronized to accurately reflect the data state ofthe primary volume. An administrator specifies a consistency group, andmirror manager 34 executes mirroring operations for all of the volumesincluded in a specified consistency group.

In the mirroring operation, mirror manager 34 uses a bitmap table 170,as illustrated in FIG. 11, for each primary volume to determine thecurrent mirror status of the secondary volume. The bitmap table 170consists of entries for a segment size 171 for each bitmap, currentcopying point 172 to identify the current copy point segment in thebitmap table 170, segment number 173 for each segment in the volume,bitmap flag 174 to indicate whether or not the segment was modified bythe update(s) made to the primary volume, and status 175 of bitmap toindicate whether the segment is “writing”, “copying” or “normal”. Thus,when an update is made to primary volume 49, flag 174 for thecorresponding segment in bitmap table 170 is changed from “off” to “on”so that the segment in the secondary volume 50 may be updated during theresync operation. The details of the resync operation are set forth insteps 150-160 of FIG. 10, and as described below.

Step 150: Mirror manager resets the current copy point 172 to segment“1” in bitmap table 170.

Step 151: Mirror manager checks whether there is an “on” flag in theflag column 174 for any of the segments the bitmap 170. If it there isat least one segment with an “on” flag in flag column 174, the proceduregoes to Step 152. On the other hand if there are no “on” flags, thesecondary volume already synchronized with the primary volume, and theprocedure goes to the end.

Step 152: Mirror manager select an entry of segment 173 from bitmaptable 170 to process copy operation.

Step 153: Mirror manager 34 checks whether the bitmap's flag 174 is “on”for that segment. If the bitmap flag 174 is “on”, the procedure goes toStep 154. On the other hand, if the bitmap flag 174 is “off” theprocedure goes to Step 160 for preparing to check the next segment inthe volume.

Step 154: Mirror manager checks the status 175 for the specified bitmap.If the bitmap's status is “normal”, the procedure goes to Step 155. Ifthe bitmap's status is other that normal, such as “writing”, theprocedure goes to Step 160.

Step 155: Mirror manager checks type of mirrored volume based on Volumeinformation column 114 of the volume-port mapping table 110. If thevolume is a virtual volume, the procedure goes to Step 156. If thevolume is a conventional logical volume, the procedure skips Step 156and goes directly to Step 157.

Step 156: Mirror manager 34 determines if the segment has already had achunk of physical storage area allocated to it. If there is not a chunkalready allocated, the mirror manager 34 allocates a free chunk ofphysical storage from segment pool 130 to the volume segment for thecurrent copy point belonging to the start LBA 123 on virtual volume insecondary volume.

Step 157: Mirror manager marks as copying on bitmap's status 175 toindicate currently “copying” data on the segment to target volume'ssegment

Step 158: Mirror manager copies data from the bitmap's specified LBA andthe segment size on the source (primary)volume to the LBA and size forthe current segment on the target (secondary) volume. For example, ifthe bitmap segment number is “1” and the size of each segment is 1MB,then the LBA start address of copying is LBA 0 on VVOL or VOL and thesize of data copied is 1MB copied into segment 1 on VVOL of thesecondary volume.

Step 159: When. copying is complete, mirror manager 34 turns the bitmaptable flag to “off” for the current segment, and changes the status 175of the current segment from “copying” status back to “normal”.

Step 160: Mirror manager increases by one the current copying point 172to advance to the next segment, and the process returns to step 151until all segments in the volume have been checked. Once all segmentshave been checked,

Step 161: Mirror manager checks if current copy point is at the end ofthe total segments within a volume. If it is not, the mirror managercontinues to process to step 151. If it is at the end of total segments,mirror manager goes to step 150 to reset the current copy point, andwhen the process next reaches step 151, the procedure ends.

To resync data from secondary to primary volume, the administrator needsto execute a reverse resync operation. The reverse resync operation isas same as ordinary resync operation described above, except directionof synchronization is from the secondary volume to the primary volume,i.e., the primary volume is updated according to a bitmap table so thatthe primary volume reflects the data contained in the secondary volume.This might be take place when host computers have been using thesecondary volume to store data.

During a resync operation, normal write operations to the primary volumeneed to be able to take place while the resync operation is going on,even though direct writes to the secondary volume have been disabled.FIG. 12 illustrates a process for carrying out a write operation duringa resync operation, including steps 181-187, as described below.

Step 181: Virtual volume manager checks bitmap table 170 to determinethe status of segments in the secondary volume which correspond to thewrite operation's targeted access region on the primary volume, asdetermined from the starting address and size of the write data. If thestatus is “normal”, the write operation can also be written to thesecondary volume, and the procedure goes to Step 183. If the status isother than “normal” for any segment within the region, the proceduregoes to Step 182 wait until all segments within the specified regionhave a “normal” status.

Step 182: Virtual volume manager waits for short period time, such as afew seconds, and then returns to step 181 to again check the status ofthe corresponding segments in the secondary volume.

Step 183: Virtual volume manager changes the status on bitmap table 170for the corresponding segments of the secondary volume from “normal” to“writing”.

Step 184: Virtual volume manager checks type of secondary volume basedon VVOL information in VOL entry 114 of the volume-port mapping table110 to determine if the secondary volume is a virtual volume orconventional logical volume. If the secondary volume is a virtualvolume, the procedure goes to Step 185. On the other hand, if thesecondary volume is a conventional logical volume, the procedure skipsto Step 186.

Step 185: Virtual volume manager allocates a free segment to currentcopy point belonging to the start LBA on the virtual secondary volumefrom segment pool 130 if there is not already a segment allocated tothat LBA. The current copy point's start VLBA 123 in virtual volumetable 120 is calculated by current copy point 172 multiplied by segmentsize 171 divided by LBA size of 512 bytes in this embodiment.

Step 186: Virtual volume manager writes the write data to the targetedsegment(s) of the primary volume. If the segment keeps data as afragment within the segment, virtual volume manager reads the segment,modifies the data on the read segment data and writes the segmentincluding the modified data on primary volume. The write data is alsowritten by mirror manager to the corresponding segment(s) on thesecondary volume.

Step 187: Virtual volume manager changes the status for the segment onbitmap table from “writing” to “normal”, and the procedure ends.

Split with De-Duplication

In the first embodiment, the following the process makes a point-in-timecopy of data contained in the primary volumes and conductsde-duplication operations on the secondary volumes in a designatedconsistency group using the steps of the invention discussed above withrespect to FIG. 1. The mirror manager carries out Steps 1-3, asdiscussed above, by resetting the access authorization to the secondaryvolume by changing the access mode 116 in FIG. 6 to “Deny” or“Read-Only” (Step 1). The resync operation of FIG. 10 is carried outusing the bitmap table of FIG. 11 (Step 2), and the mirror managersuspends the pair configuration after end of resync operation (Step 3).The mirror manager checks whether de-duplication should be carried outon the secondary volume by checks the flag of de-duplication 137 for theconsistency group in mirror manager pair table 140 (Step 4). If the flagis set for de-duplication, the procedure goes to Step 5 of FIG. 1. Ifthe flag is none, the'procedure goes to Step 6.

In Step 5 of FIG. 1, mirror manager de-duplicates data on the secondaryvolumes in the consistency group. The details of the de-duplicationprocess are illustrated in FIG. 13, and include steps 191-198, asdescribed below.

Step 191: Mirror manager checks whether there are “un-processed”secondary volume in the consistency group requiring de-duplication basedon the status information 136 in the mirror manager pair table 140 inFIG. 9. If there is an unprocessed secondary volume, the procedure goesto Step 192 to process the secondary volume. On the other hand, if thereare no unprocessed secondary volumes, the procedure is complete, and theprocedure ends.

Step 192: Mirror manager selects for de-duplication an “un-processed”secondary volume from the consistency group by referring to the statusinformation 136 in the mirror manager pair table 140 in FIG. 9. Mirrormanager changes the state of the selected secondary volume from“unprocessed” to “processing” and resets a current de-duplicationaddress to “0”, i.e., which is the address of the first segment of thesecondary volume at which the de-duplication process will begin. In thefollowing steps, each segment of the volume is checked sequentially forredundant data.

Step 193: Mirror manager checks if the current de-duplication address isstill within the secondary volume's address space by referring to thesecondary volume's size information 122 in virtual volume table 120. Ifit is, then the end of the secondary volume has not yet been reached andthe procedure goes to 195. On the other hand, if the currentde-duplication address is outside the secondary volume's address space,then the end of the secondary volume has been reached and the proceduregoes to step 195.

Step 194: Mirror manager marks as “processed” in the status information137 for the secondary volume, and the procedure returns to Step 191.

Step 195: Mirror manager creates a hash code value for the datacontained in the current segment if the segment number 125 in virtualvolume table 120 indicates that a segment has been allocated (i.e., “isallocated” for the current de-duplication address; a dash (“-”)indicates “unallocated”. For determining the hash code values touniquely identify data, the process may use the MD5 hash algorithm withcheck sum for segment data, the SH-1 hash algorithm with check sum forsegment data, or various other hash algorithms. Mirror manager writesthe hash code value into column 126 of virtual volume table 120 for thecurrent segment.

Step 196: Mirror manager checks if there is same hash code value as thenewly determined hash code value within the same consistency group. Ifan identical hash code value is located within the consistency group,then the data is determined to be redundant, and this procedure goes toStep 197. On the other hand, if the identical hash code is not locatedwithin the consistency group, then the data is not redundant and theprocedure goes to Step 198.

Step 197: The data has been determined to be redundant, so mirrormanager 34 creates a link from the located segment with the matchinghash code to the segment currently being checked. Mirror manager 34stores segment number of the matched on the segment information 125 forthe current segment, and turn on the link status 127 as yes. The currentsegment may then be returned to the free segment pool.

Step 198: Mirror manager increases the current de-duplication address127 by the size of one segment 124 so that the data in the next segmentin the volume may be examined. When all allocated segments have beenprocessed and all secondary volumes in the consistency group have beenprocessed, the procedure of FIG. 13 ends. Once the de-duplication of thesecondary volumes is complete, the mirror manager may reset the accesssettings for the secondary volumes to enable them to accept all I/Ooperations, as set forth in step 6 of FIG. 1.

As discussed above, with reference to FIG. 2, when a user wants torestore data from a secondary volume to a corresponding primary volumein the first embodiment, steps 11-15 of FIG. 2 are carried out. Themirror manager prohibits access to the secondary volumes by changing theaccess mode 116 in FIG. 6 to Deny or Read-only (Step 11). Mirror managerthen checks the de-duplication flag 152 for the consistency group (Step12). If the flag is set for de-duplication, the procedure goes to Step13, and if the flag is not set, the procedure goes to Step 14 and thedata is restored from a convention secondary volume.

When a secondary volume has been the subject of the de-duplicationoperation of the invention, and the mirror manager 34 resynchronizesdata from the secondary volume to the primary volume, the mirror managermust take into account that the secondary volume is a virtual volume andhas been de-duplicated to remove redundant segments (Step 13). Thus, therestore operation uses the same steps as if a host computer were tryingto read secondary volume directly. For example, after the split andde-duplication of a secondary volume, a host computer or other user maywant to access the secondary volume. Thus a read or write operation on avirtual volume that has been de-duplicated under the invention issubstantially different from a read or write request for a conventionallogical volume. The process carried out when a read request is receivedis set forth in FIG. 14, while the process carried out when a writerequest is received is set forth in FIG. 15.

When virtual volume manager 35 receives a read request from hostcomputer 20 via port 38, it executes the procedure set forth in FIG. 14,including steps 201-208, as described below.

Step 201: Virtual volume manager 35 creates a buffer in which size isdefined by Transfer Length (e.g., from 32 to 39 bits in SCSI Read(6)command), and prepares a buffer_counter to write data on the buffer fromthe virtual secondary volume. The buffer_counter is initially set as“zero”.

Step 202: Virtual volume manager prepares a read_pointer to indicate acurrent read point on a LBA on the virtual secondary volume and resetsthe value as SCSI Read requested LBA (e.g., from 11 to 31 bits in SCSIRead(6) command).

Step 203: Virtual volume manager checks whether the read pointer is lessthan the requested Transfer Length in case that buffer starts from zero.If it is, the procedure goes to Step 204. If it is not, the proceduregoes to Step 208.

Step 204: Virtual volume manager checks whether a segment specified bythe read_pointer LBA is allocated on the virtual volume. If a segment isallocated for the read_pointer LBA, the procedure goes to Step 206. If asegment is not allocated, then this procedure goes to Step 205.

Step 205: Since a segment is not allocated for the LBA requested by theread command, the virtual volume manager writes null data or user/systemdefined characters onto the buffer from buffer counter to buffer counterplus size of the read command within the segment.

Step 206: Since a segment is allocated for the LBA requested by the readcommand, the virtual volume manager reads the data on the segmentspecified by segment number 125 from the LBA which is specified byread_pointer to the end of a segment which is specified by start LBA 123plus segment size 124, and then puts the data on the buffer frombuffer_counter to buffer_counter plus size of read data. Thus, if theoriginal segment corresponding to the LBA was released duringde-duplication, then the linked segment is listed in column 125, and thedata is read from the linked segment.

Step 207: Virtual volume manager increases the buffer counter up by thesize of the written data on the buffer, and virtual volume managerincreases the read pointer by the size of the read data from thesegment.

Step 208: Virtual volume manager returns the buffer data as the returnfor the SCSI read command.

When virtual volume manager 35 receives a write request from a hostcomputer 20 via port 38 directed to a secondary volume that has beende-duplicated under the invention, the procedure of FIG. 15 is executed,including steps 211-223, as described below.

Step 211: Virtual volume manager 35 checks whether the status onsegments which include the write operation's access region from thestarting address plus the size of the write data is “normal” by checkingbitmap table 170. If the status is normal, the procedure goes to Step213. If the status is not normal for one or more of the segments withinthe region, the procedure goes to Step 212.

Step 212: Virtual volume manager waits for short period time, such as afew minutes and again goes to step 211 to determine if the status forall segments in the write operation access region are normal.

Step 213: Virtual volume manager changes the status for the affectedsegments on bitmap table 170 from “normal” to “writing”.

Step 214: Virtual volume manager writes the host-provided write dataonto a write buffer on the controller's memory 17 and resets the writebuffer pointer to zero to indicate the current writing point on thewrite buffer.

Step 215: Virtual volume manager prepares a write_pointer to indicatethe current writing point on the LBA in the virtual volume, and resetsthe value as a SCSI Write requested LBA (e.g., from 11 to 31 bits in aSCSI Write(6) command).

Step 216: Virtual volume manager checks if the write_pointer is under(less than) the requested Transfer Length. If it is, the procedure goesto Step 217. If it is not, this procedure goes to Step 223.

Step 217: Virtual volume manager checks whether the target segmentspecified by the write_pointer's LBA has already been allocated byreferring to segment number column 125 in virtual volume table 120. Ifcolumn 125 contains a dash (“-”), then the segment has not yet beenallocated, and the procedure goes to Step 218. If column 125 contains asegment number then the segment has been allocated, and the procedureskips to Step 219.

Step 218: Virtual volume manager allocates a free segment from segmentpool 130 to the virtual volume for the write_pointer for the start LBA.

Step 219: Virtual volume manager 35 checks if the target segmentspecified by write_pointer's LBA is “linked” to another segment in theconsistency group by check linked column 127 in virtual volume table120. If the target segment is linked, the procedure goes to Step 220. Ifthe target segment is not linked to another segment, the procedure goesto Step 221.

Step 220: Since the target segment for the write operation is linked,i.e., there is not an actual segment allocated, but instead, a different. segment contains the-same data, virtual volume manager allocates afree segment and copies the data from the linked segment. Then, virtualvolume manager changes the segment number from the linked segment to theallocated segment and turns the link status of the allocated segment toshow that it is not linked, as indicated by a dash (“-”) in the linkedcolumn 127.

Step 221: Virtual volume manager writes data to the secondary volume onthe segment indicated by the write_pointer. If the write to the segmentis a fragment within the segment because the write_pointer's address isnot equal to the segment LBA, virtual volume manager reads the data inthe segment, updates the read data with the write data, and the writesthe modified data back on to the segment.

Step 222: Virtual volume manager counts write buffer counter up by sizeof write data on the buffer, and virtual volume manager increases thewrite_pointer by the size of the write data from the segment

Step 223: Virtual volume manager changes the status for the segment 175on bitmap table from “writing” to “normal” and the bitmap flag 174 from“off” to “on”, and the procedure ends.

Deleting a Mirror Pair or a Consistency Group

When a user wants to delete the mirroring pair, an administratorexecutes a “delete pair” operation specifying the pair number to agent29. Mirror manager 34 on storage system 31 receives the delete pairoperation and deletes the entry of pair for the specified pair number.

Also when a user wants to delete a consistency group, an administratorexecutes a “delete consistency group” operation by specifying theconsistency group number to agent 29. Mirror manager on storage system30 receives the operation and deletes all entries of pairs for thespecified consistency group number and also the entry for the specifiedconsistency group.

Embodiment 2: Remote Mirror, Using a SAN

The second embodiment 2 implements a remote mirror configuration using aSAN. The differences between the first and second Embodiments arediscussed below. FIG. 16 illustrates the physical configuration. of thesecond embodiment. A secondary storage system 40 is connected forcommunication via networking hardware 82 to primary storage system 30.The secondary storage system 40 may be of the same hardwareconfiguration as primary storage system 30, with a port 41 todistinguish from port 38 on primary storage system 30. Using ports 38and 41, the storage systems 30, 40 are able to communicate with eachother. A second host 20 is connected for communication with secondarystorage system 40 via networking hardware 80.

The networking hardware 82 between storage systems 30, 40 may be aswitch, router, or the like located between ports 38 and 41, fortransmitting block level command sets such as SCSI (Small ComputerSystem Interface) or ESCON (Enterprise Systems Connection) commands. Thehardware 82 may be a generic Fibre Channel (FC) switch, Ethernet Switch,Ethernet hub, or Internet Protocol (IP) Router. Thus, the logicalconnection 82 between storage systems 30, 40 may be a SAN that is partof SAN 81, or may be a storage wide area network (SWAN), or othernetwork type.

FIG. 17 illustrates a logical configuration of the embodiment of FIG.16. Secondary storage system 40 includes a mirror manager 34, a VOL-Portmapping table 32, a virtual volume manager 35 and a volume manager 33.To replicate data between primary storage system 30 and secondarystorage system 40, mirror manager pair table includes primary storagesystem's serial number in column 143 and secondary storage system serialnumber in column 147, as illustrated in FIG. 9B. A plurality ofsecondary volumes 51 are located in secondary storage system 40 thatmirror data on primary volumes 49 in primary storage system 30. Othercapabilities of primary storage system 30 and secondary storage system40 are the same as described above for the first embodiment.

Because the secondary volumes 51 are located in secondary storage system40, the storage administrator must setup the virtual volumes on thesecondary storage system 40. The operation of the invention is the sameas described above for the first embodiments. In particular, thesecondary volumes 51 may be synchronized with the primary volumes 49,split, and the data contained subjected to de-duplication. The processesfor conducting the resync, de-duplication, restore, reading, and writingoperations are the same as described above.

Embodiment 3: Local Mirror with Storage Virtualization ApparatusConfiguration

FIG. 18A illustrates a physical configuration of the third embodimentsof the invention, while FIG. 18B illustrates the logical configuration.The illustrated embodiment is an example of a hardware configurationthat includes a storage virtualization apparatus 650 in communicationwith host computer 20 and storage system 30, whereby virtualizationapparatus 650 is able to present virtual volumes to host computer 20,while the data for the virtual volumes is actually stored in one or moreexternal storage systems, such as storage system 30. Thus,virtualization apparatus is able to receive data addressed by hostcomputer 20 as if it were an actual storage system, and then forward thereceived data to the external storage system for storage of the data.Storage virtualization apparatus 650 may be an apparatus such asTagmaStore® Universal Storage Platform, available from Hitachi DataSystems, of Santa Clara, Calif.

Host computer 20 is connected for communication with storagevirtualization apparatus 650 via SAN 81 (networking hardware 80) andport 638. Storage virtualization apparatus 650 is also connected forcommunication on its back end with primary storage system 30 via port637. This may either be a direct connection, or may be a connection viaSAN 81 or other network. In this configuration, storage virtualizationapparatus 650 may include a CPU 618, a memory 617, a hard disk drive632, and may have the same capabilities as storage system 30 in FIG. 4discussed above. Thus, mirror manager 34, volume-port mapping 110,volume manager 33, and virtual volume manager 35 may be modulesinstalled on virtualization apparatus 650. A primary volume and/or asecondary volume to be used by a host computer 20 may be created on diskdevice 632 contained within storage virtualization hardware 650, or maybe created on external storage systems 30. In the example illustrated inFIG. 18B, a consistency group is created with primary volume 49 andlocal secondary volumes 50 on storage system 30.

To manage volumes created on external storage system 30, storagevirtualization apparatus 650 may include an external volume mappingtable, as illustrated in FIG. 19. When the storage virtualizationapparatus 650 discovers external volumes on external storage 30, theexternal volumes are registered with an external volume number (Ex-VOLnumber) as identifier of virtualization apparatus's volume number 301,the size for the external volume (LU) 302, WWN for the port of theexternal storage system 303 for accessing the external volume, and thenLUN 304 on external storage system for accessing the external volume.Volume manager can use the registered Ex-VOL number, such as Ex-VOL 1instead of VOL 1 as volume 114 in volume-port management table 110 ofFIG. 6. The external storage system is able to provide conventional LUswhich consist of volumes and RAID configured-disks, as discussed abovefor storage system 30 in the first embodiments.

Embodiment 4: Remote Mirror with Storage Virtualization ApparatusConfiguration

The fourth embodiment is another configuration that uses a storagevirtualization apparatus, such as Hitachi's TagmaStore® UniversalStorage Platform. In this embodiment, first and second host computers 20are connected respectively to a first storage virtualization hardware650 and a second storage virtualization hardware 655, as illustrated inFIGS. 18C-18D. First host computer 20 is connected for communicationwith first storage virtualization apparatus 650 via SAN 81 (networkinghardware 80) and port 638. First storage virtualization apparatus 650 isalso connected for communication on its back end with primary storagesystem 30 via port 637. Similarly, a second storage virtualizationapparatus 655 is connected for communication with a second host 20 viaport 641 and SAN 81 (networking hardware 80), and second storagevirtualization apparatus 655 is connected for communication via port 657on the backend with secondary storage system 40. In the exampleillustrated in FIG. 18D, a consistency group is created with primaryvolumes 49 being created on primary storage system 30, and remotesecondary volumes 51 being created on secondary storage system 40. Tomanage volumes created on external storage systems 30, 40, storagevirtualization apparatuses 650, 655 may include external volume mappingtables, as illustrated in FIG. 19. The remote mirroring configuration ofthis embodiment is able to operate in the same manner as theconfiguration of the second embodiment, described above.

Embodiment 5: Local Mirror under Intelligent Switch-Based StorageVirtualization Configuration

As an alternative to using the storage virtualization apparatus 650, 655discussed above, an intelligent switch may be used to load the mirrormanger module 34 and present the primary and secondary volumes. Thus,this embodiment may use intelligent switch hardware, such as CISCO MDS9000, available from Cisco Systems Inc., San Jose, Calif., as avirtualization apparatus. The logical configuration for the fifthembodiment may be the same as for the third embodiment illustrated inFIG. 18B, in which a primary volumes are mirrored locally within storagesystem 30. In this configuration, a user is able to use volumes onexternal storage system 30 for storage, while intelligent switch managesthe mirroring, split and de-duplication operations discussed above inthe first embodiment. Also, since an intelligent switch generally doesnot have a large cache, a port on the switch having a memory area may beused to buffer Fiber Channel frames that contain SCSI commands and tomirror the frames using mirror manager 34. To process received accesscommands, the intelligent switch process the commands using a controlprocessor that includes enough memory to carry out the de-duplicationprocess of FIG. 13. The control processor may be located internally inthe intelligent switch, or externally, such as at a PC connected byFibre Channel. Other capabilities and processes of the fifth embodimentare as same as for the third embodiment described.

Embodiment 6: Remote Mirror under Intelligent Switch-Based StorageVirtualization Configuration

The sixth embodiment is another configuration that uses intelligentswitch hardware such as the CISCO MDS 9000 discussed above. The logicalconfiguration of this embodiment is the same as the fourth embodimentconfiguration of FIG. 18D discussed above, with intelligent switchesreplacing storage virtualization apparatuses 650, 655. In thisconfiguration, a user can use external storage systems 30, 40 forphysical storage of data, while the intelligent switches are the targetof storage from the view of the host computers 20. The operation of thesixth embodiment is the same as for the fourth embodiment discussedabove.

Embodiment 7: Local Mirror using Network Attached Storage

This embodiment is another example of an information system of theinvention, and includes a local mirror de-duplication configuration in anetwork attached storage (NAS) environment. FIG. 20 illustrates thephysical and logical configuration of the seventh embodiment. Thephysical configuration consists of a NAS system 320, a host computer310, and a local area network (LAN) 340. The NAS system 320 includes acontroller 321 and a plurality of storage devices (not shown). NAScontroller 321 includes a CPU and memory (not shown), and NAS controller321 also includes a network interface card (NIC) 327 to enablecommunication via LAN 340. An export table 322, a file system to volumemapping table 323, a mirror manager 324, and a file system (FS) module325, and bitmap table 380 may be included on NAS controller 321 forcarrying out the invention.

The host computer 310 may be a general purpose server, and may bephysically the same as host computer 20 of the first embodiment, butwith a network interface card (NIC) 314 installed instead of HBA 25. ATCP/IP module 317, a NFS/CIFS module 316, an operating system (notshown), one or more applications 318 and an agent 319 may be included onhost computer 310 to send data to and control NAS 320 via LAN 340, andfor carrying out the invention. LAN 340 may be implemented by Ethernetswitches/hubs, a fiber-distributed data interface (FDDI) or other kindof IP-reachable protocol hardware (not shown).

In order to provide a useable file system namespace to host computer 310so that host computer can use the file system for storing and retrievingdata, an administrator accesses NAS system 320 to perform a setupoperation. The setup operation creates one or more volumes from the diskdevices, and file system module 325 is used to create manage a filesystem on the created volume and to export the created file system tohost. The setting is information is stored on file system-volume(FS-VOL) mapping table 323 and export table 322.

FIG. 21 illustrates file system-volume (FS-VOL) mapping table 323.FS-VOL mapping table includes entries for a device name 351, and a filesystem mount point from root 352. Similar to virtual volume mappingtable 120 of FIG. 7 in the first embodiment, FS-VOL mapping table 323includes a segment size(Sgmt Size) 358, a filename 353, a block address354, a segment number(Segmt No.) 355, a hash identifier 356, and a linkstatus 357, which will be discussed further below. FIG. 22 illustratesexport table 322, which includes an exported file system directory 361and access mode 362 specified for the exported file system 361. Theaccess mode for file system operates in the same manner as the accessmode in the first Embodiment.

After creation of a volume, NAS system 320 assigns a device name 351onto FS-VOL mapping table 323. After creation of the file system forthat device, NAS system 320 assigns a mounted directory, such as “/fs1”,which is stored in file system directory column 352. After exporting offile system to the host computer 310, NAS system 320 the directorybecomes an exported directory, and the information is stored in exportedfile system name 361 in export table 322. In the example embodiment, NASsystem 320 de-duplicates the content of files under a consistency group.The following procedure describes how to de-duplicate a file systemafter a split operation under of a file system mirror.

Operations

The administrator exports a primary file system and a secondary filesystem to host computer 310. To control NAS system 320, agent 319 isable to control mirror operations for the exported file systems on NASsystem 320 via TCP/IP connection over LAN 340.

Using a command line interface on agent 319, or other means, anadministrator creates a consistency group and pairs between primary filesystems 53 and secondary file systems 54. At this time, theadministrator turns the invention's “de-duplication option” on for theconsistency group. In this operation, a mirror manager pair table 370may be used, as illustrated in FIG. 23 to store mirroring information.The pair table 370 consists of a pair number 371 to identify a mirroringpair, a consistency group number 372 to indicate a consistency group inwhich mirror manager 324 serialize I/Os among file systems, andde-duplicates data within the consistent group. Primary and secondaryfile systems information and status of de-duplication 377 to indicatewhether the de-duplication operation has been “processed”, is“processing”, or is “un-processed”.

The primary and secondary volume information consists of the serialnumber for the NAS system 373, 375, and the file system 374, 376. Inthis embodiment, local file systems within the same NAS system 320 areused as the mirror file systems 54. Thus, the serial number 373 for theprimary NAS system (“50121”) is as same as the serial number 375 for thesecondary NAS system (“50121”). Moreover, mirror manager pair table 370includes the status of de-duplication 377 for each pair to indicate thecurrent state of the secondary file systems regarding de-duplication. Ade-duplication flag entry 378 is included for each consistency group toindicate whether the mirror manager 324 should execute de-duplication onthe secondary volumes in the consistency group.

Resync/Reverse Resync

Similar to the first embodiment, as resync operation synchronizes thedata on the secondary file systems with the data in the correspondingprimary file systems under a specified consistency group. Theadministrator specifies a consistency group, and mirror manager 324executes a mirror operation for all of the file systems on the specifiedconsistency group. In the mirror operation, mirror manager 324 usesbitmap table 380, as illustrated in FIG. 24, for each file on each filesystem to determine the current mirror status of each files. The bitmaptable 380 consists of a filename 381 to identify the file, a segmentsize 382 for each bitmap, a current copying point to identify thecurrent copy point 383 in the bitmap, a bitmap segment number 384 toidentify each bitmap segment, a bitmap flag 385 to indicate whether thesegment was modified or not, and a status of bitmap 386 to indicateswhether the segment is “writing”, “copying” or “normal”. The details ofthe resync operation for a file system are illustrated in FIG. 25, andinclude steps 400-404, as described below.

Step 400: Mirror manager 324 creates a list of mirrored files onmirrored primary file system. The mirror manager puts all of files on afile list 413, as illustrated in FIG. 26. The file list 413 includes atarget name of a file system 410, a mirrored filename includingdirectory (path) information 411, the status of mirroring 412 toindicate the status mirroring for each file, such as synchronized,resynchronizing, or pending.

Step 401: Mirror manager selects a file from the file list 413 ofmirrored files.

Step 402: Mirror manager checks whether all files are mirrored or not.If all files have not yet been mirrored, this procedure goes to Step403. If all files have been mirrored, this procedure goes to the end ofprocedure.

Step 403: Mirror manager creates a file including on secondary filesystem and resyncs the content of file (details of this are discussedbelow).

Step 404: Mirror manager selects the next file from the list of mirroredfiles until the procedure ends.

Regarding the resync operation for the actual contents of a file, thisembodiment uses Steps 150 to 160 of FIG. 10 and bitmap table 170 of FIG.11, as discussed above for the first embodiment. However, due to themirroring of files in this embodiment rather than blocks of data, somechanges are necessary for the procedure. The first change is segmentsize 171: in the present embodiment, a smaller more granular size, suchas 2 KB may be used, rather than 1 MB, as in the first embodiment. Asecond change is the allocation on use virtual volume used in Step 155and Step 156. In conventional file systems, I-nodes are used to store aportion of the data on each file. Thus, Step 155 can be eliminated, andStep 156 can be changed as follows.

Step 156: Mirror manager allocates a free segment to the current copypoint's start LBA in the secondary file system from the free segmentpool in the file system. The current copy point's start LBA iscalculated by current copy point 172 times segment size 171.

During the resync operation, normal write operations need to beconsidered that take place during the resync operation. FIG. 27illustrates the procedure that may be used, which is similar to that setforth in FIG. 12 of the first embodiment.

Step 781: The file system checks whether the status of the segments thatinclude the write operation's access region from a starting address tothe addition of the size of the write data on bitmap table 380 is“normal” or not. If yes, the procedure goes to Step 183. If any segmentwithin the region is not normal, the procedure goes to Step 182.

Step 782: File system waits for short period time, such as a fewminutes, and returns to Step 781.

Step 783: File system changes the status for the segment on bitmap table380 from “normal” to “writing”.

Step 784: File system allocates a free segment to the current copy pointfor the segment of the file system in the secondary file system from thefree segment pool in the file system if there is not already a segmentallocate. The current copy point for the segment is calculated bycurrent copy point 383 times segment size 382.

Step 785: File system writes data to the segment of the file in theprimary file system. If the segment keeps data as a fragment within thesegment, the file system reads the segment, modifies the data on theread data and writes the modified data into the file on primary filesystem. The write data is also stored by mirror manager on thecorresponding secondary file system which is specified by the mirrormanager pair table 370.

Step 786: File system changes the status for the segment on bitmap tablefrom “writing” to “normal”, and the procedure ends.

To resync data from a secondary file system to a primary file system,the administrator needs to execute a reverse resync, which is the sameas the ordinary resync operation described above for FIG. 25, exceptthat the direction of mirroring (updating) is reversed.

Split with De-Duplication

The processing of a point-in-time copy of data from a primary filesystem and considering de-duplication is similar to that carried out forthe first embodiment, and as described above in FIG. 1 and FIG. 13 andthe restore process described above in FIG. 2. In the presentembodiment, the object of mirroring is changed from a volume to a filesystem. Considering of this point, details of the de-duplication processare set forth in FIG. 28, and includes steps 791-798, as set forthbelow.

Step 791: Mirror manager checks whether there are any “un-processed”secondary file systems based on the status information 377 in FIG. 23.If there is one or more un-processed secondary file system, theprocedure goes to Step 792. If there is not, the procedure ends.

Step 792: Mirror manager selects for de-duplication an “un-processed”secondary file system from the consistency group by referring to thestatus information 377 in pair table 370, changes the state to“processing”, and resets the current de-duplication address to “0”.

Step 793: Mirror manager checks if the current de-duplication address isoutside the file size on the primary file system. If it is, thende-duplication of the file is complete and the procedure goes to Step794. If it is not, then procedure goes to Step 795.

Step 794: Mirror manager marks as “processed” in the status information378 for the secondary file system, and the procedure returns to Step791.

Step 795: Mirror manager calculates a hash code value for the datacontained within the current segment if the segment number 355 isallocated; a dash (-) indicates “unallocated”, i.e., no segment isallocated for that address. For creation of the hash code value touniquely identify data, the procedure may use MD5 hash algorithm withcheck sum for segment data, SH-1 algorithm with check sum for segmentdata, or other suitable hash algorithm. Mirror manager enters the hashinformation in column 356 for the corresponding segment.

Step 796: Mirror manager checks if there is a matching hash value withinthe consistency group. If there is, the procedure goes to Step 797. Ifthere is not, the procedure skips to Step 798.

Step 797: Mirror manager make a link from found segment which has samedata to current segment being checked. Mirror manager stores the segmentnumber on the segment number information 355 and turns on the linkstatus 357 as yes (linked).

Step 798: Mirror manager increases the current de-duplication address bythe size of the current segment, and the procedure returns to Step 793.

Regarding restoration of data to the primary file system, the processset forth in FIG. 2 may be followed, taking into consideration that theprocess is carried out for file systems in a NAS system rather than forvolumes in a block-based storage system.

Step 11: Mirror manager prohibits accessing for the secondary filesystem by changing the access mode 362 in export table 360 of FIG. 22 to“Deny” or “Read-Only”.

Step 12: Mirror manager checks the de-duplication flag 378 forconsistency group in pair table 370 of FIG. 23. If the de-duplicationflag indicates that the consistency group is subject to de-duplicationoperations, the procedure goes to Step 13. On the other hand, if theflag is not set for de-duplication, the procedure goes to Step 14.

Step 13: Mirror manager resynchronizes data from the secondary filesystem (which has been previously de-duplicated) to the correspondingprimary file system. In the case of a read of the secondary file systemto the primary file system, the mirror manager uses the read accessoperations from Step 1201 to Step 1208 set forth in FIG. 29, which aresimilar to steps 201-208 of FIG. 14 described above.

Step 14: Mirror manager resynchronizes data from a normal file system tothe primary file system, since the secondary file system was notde-duplicated.

Step 15: Mirror manager allows access to the secondary file system againfor accepting all 110 operations by changing the setting in column 362of export table 36 of FIG. 22, and the procedure ends.

Read/Write De-Duplication File system

After the split of the secondary file system, a user may want to accessthe data in the secondary file system. Read/write operations on thede-duplicated file system are different from normal read/writeoperations for a normal (non-de-duplicated) file system. In a readoperation based on NFS/CIFS or mirror manager, file systems returnnormal data if the file system has not been de-duplicated on a segmentspecified by address in the read request. However, when the segment hasa “yes” linked status 357 that indicates that segment is linked to aduplicate segment, then the operations of FIG. 29 are necessary, addescribed below.

Step 1201: File system manger creates a buffer, the size of which isdefined by mirror manager or “count” in NFS instead of Transfer_Lengthin SCSI, and prepares a buffer_counter to write data on the buffer fromthe de-duplicated file system. The buffer_counter is initially set to“zero”.

Step 1202: File system manager prepares a read_pointer to indicate thecurrent read point on a file and resets the value 372 “segment size” asrequested offset, which in the case of mirror manager is the “offset” inNFS.

Step 1203: File system manager checks whether the current read point isunder the read_pointer. If it is, this procedure goes to Step 1204. Ifit is not, then all data has been read, and the procedure goes to Step1208.

Step 1204: File system checks if a segment specified by read_pointer LBAis allocated. If the segment has is allocated, the procedure goes toStep 1206. If the segment is not allocated, the procedure goes to Step1205.

Step 1205: File system writes null data or user/system-definedcharacters onto the buffer from buffer counter to buffer_counter plussize of the read within the segment.

Step 1206: File system reads data on a segment specified by segmentnumber 355 from LBA which is specified by read_pointer to end of thesegment which is specified by the block address 354 plus segment size358, and then puts the data on the buffer from buffer_counter to size ofthe read data.

Step 1207: File system increases the buffer counter by the size of thewritten data on the buffer, and increases the read_pointer by the sizeof the data read from the segment.

Step 1208: File system manager returns the data in the buffer to mirrormanager or as a NFS read return, and the procedure ends. In the case ofCIFS, the behavior is same except for the names of the parameters for“count” and “offset”. Further, deletion of a pair or consistency groupin this embodiment is carried out using the same operation as describedabove in the first embodiment.

Embodiment 8: Remote Mirror in a NAS System

FIG. 30 illustrates the physical & logical configuration of an eighthembodiment of the invention. In the physical configuration, the seventhembodiment of FIG. 20 is incorporated as a first NAS system 320 incommunication with a host computer 310 via a LAN 340, as describedabove. A secondary NAS 500 is included in this embodiment for receivingremote mirroring, and a second host computer 310 which is connected tosecondary NAS 500 via a LAN 342 and a NIC 503. The secondary NAS 500 maybe of the same configuration as primary NAS 320, and NAS 320 includes aNIC 328 able to communicate with a NIC 501 on secondary NAS 500 via widearea network (WAN) 341. WAN 341 may be an IP reachable network switch orrouter, such as a generic Fibre Channel (FC) switch, Ethernet switch,Ethernet hub, or Internet Protocol (IP) router. Also a managementconsole 72 may be connected to NAS systems 320, 500 via a LAN or WAN 74,which may be the same as WAN 341, or separate.

In the logical configuration of this embodiment, rather than having alocal mirror replication, data is mirrored between primary file systems53 on NAS 320 and secondary file systems 55 on NAS 500. Thus, mirrormanager pair table 370 will have difference serial numbers entered incolumns 373 and 375. Based on this information, the NAS systems 320, 500are able to communicate with each other for transmitting data. Thus, thesecondary file systems 55 are located in secondary NAS 500 in thisembodiment, but other basic capabilities and operations under theinvention are the same as described above for the seventh embodiment.

Thus, it may be seen that the invention provides a general purposemirroring environment for purposes of backup, data archiving, anddisaster recovery, while reducing the amount of storage space requiredfor supporting the mirroring environment. Further, while specificembodiments have been illustrated and described in this specification,those of ordinary skill in the art appreciate that any arrangement thatis calculated to achieve the same purpose may be substituted for thespecific embodiments disclosed. This disclosure is intended to cover anyand all adaptations or variations of the present invention, and it is tobe understood that the above description has been made in anillustrative fashion, and not a restrictive one. Accordingly, the scopeof the invention should properly be determined with reference to theappended claims, along with the full range of equivalents to which suchclaims are entitled.

1. A storage system comprising: a controller including a centralprocessing unit (CPU) and a memory; and a plurality of storage devicesbeing managed by the controller; wherein the controller manages aplurality of storage volumes related to the plurality of storagedevices, the plurality of storage volume including a storage volumestoring copy data of data to be stored in another storage volume as amirror source storage volume in a synchronous operation; and wherein thecontroller, after a suspension of the synchronous operation, performs ade-duplication operation to the storage volume if the storage volume isflagged for de-duplication, the storage volume being a mirror targetstorage volume.
 2. The storage system according to claim 1, wherein thecontroller prohibits access to the mirror target storage volume beforethe suspension of the synchronous operation and allows access to themirror target storage volume after the de-duplication operation.
 3. Thestorage system according to claim 2, wherein the de-duplicationoperation includes: selecting segments of the mirror target storagevolume during a de-duplication operation on the mirror target storagevolume; calculating a hash value for a particular segment representativeof data contained in the particular segment; comparing the calculatedhash value with previously-stored hash values for other segments in themirror target storage volume; linking the particular segment to anothersegment having a previously-stored hash value that matches thecalculated hash value of the particular segment; and releasing theparticular segment from the mirror target storage volume when anothersegment has a previously-stored hash value that matches the calculatedhash value of the particular segment, whereby physical storage capacityrequired for the mirror target storage volume is reduced.
 4. The storagesystem according to claim 3, wherein the plurality of storage volumesinclude a plurality of the mirror source storage volumes and a pluralityof the mirror target storage volumes forming a consistency group inwhich each mirror source storage volume is mirrored to one of the mirrortarget storage volumes, wherein comparing the calculated hash value withpreviously-stored hash values for other segments in the mirror targetstorage volume includes comparing the calculated hash value withpreviously-stored hash values for segments of all the plurality of themirror target storage volumes in the consistency group, and wherein theplurality of mirror target storage volumes in the consistency group havethe same status on whether a mirror target storage volume has beendesignated for de-duplication operations, and the status is indicated bya flag in the memory.
 5. The storage system according to claim 2,wherein in a restore operation, the controller checks if thede-duplication operation has been processed and reverse resynchronizesdata from the de-duplicated volume to the mirror source storage volumeif the de-duplication operation has been processed.
 6. The storagesystem according to claim 5, wherein the mirror target storage volume isa virtual volume having a plurality of logical addresses, whereinsegments of physical storage capacity are allocated for a logicaladdress as required when data is stored to the logical address, whereinthe mirror target storage volume is de-duplicated by selecting segmentsof the mirror target storage volume during a de-duplication operationand a hash value is calculated for a particular segment representativeof data contained in the particular segment, wherein the calculated hashvalue is compared with previously-stored hash values for other segmentsin the mirror target storage volume, and the particular segment islinked to another segment having a previously-stored hash value thatmatches the calculated hash value of the particular segment, and whereinthe particular segment is released from the mirror target storage volumewhen another segment has a previously-stored hash value that matches thecalculated hash value of the particular segment, whereby physicalstorage capacity required for the mirror target storage volume isreduced.
 7. The storage system according to claim 1, wherein in arestore operation, the controller reverse resynchronizes data againstthe mirror source storage volume, and during the restore operation, thestorage system is capable of receiving write operations from a host. 8.The storage system according to claim 7, wherein during the restoreoperation, the controller checks status of segments subject to writeoperation access and holds or processes the write operation depending onthe status of the segments subject to write operation access, the writeoperation access to be performed to both the mirror source storagevolume and mirror target storage volume.
 9. The storage system accordingto claim 8, wherein the controller checks status of segments subject towrite operation access by checking a bitmap in the memory.
 10. Acomputer-readable storage medium storing a plurality of instructions forcontrolling a data processor to manage a plurality of volumes related toa plurality of storage devices of a storage system which includes acontroller having a memory, the plurality of instructions comprising:instructions that cause the data processor to store, in a storagevolume, copy data of data to be stored in another storage volume as amirror source storage volume in a synchronous operation; andinstructions that cause the data processor, after a suspension of thesynchronous operation, to perform a de-duplication operation to thestorage volume if the storage volume is flagged for de-duplication, thestorage volume being a mirror target storage volume.
 11. Thecomputer-readable storage medium according to claim 10, wherein theplurality of instructions further comprise: instructions that cause thedata processor to prohibit access to the mirror target storage volumebefore the suspension of the synchronous operation and allow access tothe mirror target storage volume after the de-duplication operation. 12.The computer-readable storage medium according to claim 11, whereininstructions that cause the data processor to perform a de-duplicationoperation comprise: instructions that cause the data processor to selectsegments of the mirror target storage volume during a de-duplicationoperation on the mirror target storage volume; instructions that causethe data processor to calculate a hash value for a particular segmentrepresentative of data contained in the particular segment; instructionsthat cause the data processor to compare the calculated hash value withpreviously-stored hash values for other segments in the mirror targetstorage volume; instructions that cause the data processor to link theparticular segment to another segment having a previously-stored hashvalue that matches the calculated hash value of the particular segment;and instructions that cause the data processor to release the particularsegment from the mirror target storage volume when another segment has apreviously-stored hash value that matches the calculated hash value ofthe particular segment, whereby physical storage capacity required forthe mirror target storage volume is reduced.
 13. The computer-readablestorage medium according to claim 12, wherein the plurality of storagevolumes include a plurality of mirror source storage volumes and aplurality of mirror target storage volumes forming a consistency groupin which each mirror source storage volume is mirrored to one of themirror target storage volumes, wherein the instructions that cause thedata processor to compare the calculated hash value withpreviously-stored hash values for other segments in the mirror targetstorage volume comprise instructions that cause the data processor tocompare the calculated hash value with previously-stored hash values forsegments of all the plurality of mirror target storage volumes in theconsistency group, and wherein the plurality of mirror target storagevolumes in the consistency group have the same status on whether amirror target storage volume has been designated for de-duplicationoperations, and the status is indicated by a flag in the memory.
 14. Thecomputer-readable storage medium according to claim 11, wherein theplurality of instructions further comprise: instructions that cause thedata processor, in a restore operation, to check if the de-duplicationoperation has been processed and reverse resynchronize data from thede-duplicated volume to the mirror source storage volume if thede-duplication operation has been processed.
 15. The computer-readablestorage medium according to claim 14, wherein the mirror target storagevolume is a virtual volume having a plurality of logical addresses,wherein segments of physical storage capacity are allocated for alogical address as required when data is stored to the logical address;and wherein instructions that cause the data processor to perform ade-duplication operation comprise: instructions that cause the dataprocessor to select segments of the mirror target storage volume duringa de-duplication operation on the mirror target storage volume;instructions that cause the data processor to calculate a hash value fora particular segment representative of data contained in the particularsegment; instructions that cause the data processor to compare thecalculated hash value with previously-stored hash values for othersegments in the mirror target storage volume; instructions that causethe data processor to link the particular segment to another segmenthaving a previously-stored hash value that matches the calculated hashvalue of the particular segment; and instructions that cause the dataprocessor to release the particular segment from the mirror targetstorage volume when another segment has a previously-stored hash valuethat matches the calculated hash value of the particular segment,whereby physical storage capacity required for the mirror target storagevolume is reduced.
 16. The computer-readable storage medium according toclaim 10, wherein the plurality of instructions further comprise:instructions that cause the data processor, in a restore operation, toreverse resynchronize data against the mirror source storage volume,wherein during the restore operation, the storage system is capable ofreceiving write operations from a host.
 17. The computer-readablestorage medium according to claim 16, wherein the plurality ofinstructions further comprise: instructions that cause the dataprocessor, in the restore operation, to check status of segments subjectto write operation access and to hold or process the write operationdepending on the status of the segments subject to write operationaccess, the write operation access to be performed to both the mirrorsource storage volume and mirror target storage volume.
 18. Thecomputer-readable storage medium according to claim 17, wherein theplurality of instructions further comprise: instructions that cause thedata processor to check status of segments subject to write operationaccess by checking a bitmap in the memory.